<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<title>Cell Element</title>
<link rel="stylesheet" href="../style/style.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Cell</h1>
<p>Represents a cell element within a grid row or table row.</p>

<h3>Description</h3>
<p>Each grid or table row contains some number of cells. A 
cell can span multiple columns. The design need not specify a cell for each 
column; columns without cells are presumed empty.</p>
<p>If the cell contains more than one item, the items appear 
vertically within the cell. The developer should generally use a container to 
better control the positioning of items when the cell contains multiple items.</p>
<p>The cell height and width are optional and are seldom 
needed. However, they are available for situations where it is required to force 
a cell to a particular size.</p>

<h3>XML Summary</h3>
<h3>See Also</h3>

<h2 class="method">onCreate</h2>
<p>Script executed when the element is created in the Factory.</p>

<h3>Description</h3>
<p>Executed when the element is created in the Factory. Called after the item is created, but before 
the item is saved to the report document file. See the scripting spec for additional information 
about this script. Applications should perform visual customization in the on-render script instead.</p>

<h2 class="method">onPrepare</h2>
<p>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p>

<h3>Description</h3>
<p>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p>

<h2 class="method">onRender</h2>
<p>Script executed when the element is prepared for rendering in the Presentation engine.</p>

<h3>Description</h3>
<p>Executed when the element is prepared for rendering in the Presentation engine. Changes made to the 
element are written to the target output format, but not saved to the report document file. This is the
preferred place for visual customizations.</p>


<h2 class="property">style</h2>

<p>Name of the style applied to this cell.</p>

<h3>Description</h3>
<p><p>Rows provide many style properties. The style properties are defined in 
the <i>ROM Styles Specification</i>. A cell can inherit its style properties 
from a parent element, from a named style, or from a style that identifies the 
context in which the item appears. This property provides the name of the shared 
style to use.</p>
<p>This cell can also set the value of style properties. Properties set on this 
element &quot;override&quot; those inherited from a parent element or a shared style.</p></p>

<h3>See Also</h3>
<p>Style element in the <i>ROM Styles Specification</i>.</p>
<h2 class="property">column</h2>

<p>The column in which the cell starts.</p>

<h3>Notes</h3>
<p>Default value: One after the previous column.</p>

<h3>Description</h3>
<p><p>The column in which the cell starts. Columns are numbered 
from 1.</p>
</p>

<h3>See Also</h3>
<h2 class="property">colSpan</h2>

<p>The number of columns that this cell spans.</p>

<h3>Description</h3>
<p><p>The number of columns that this cell spans. Defaults 1 
one, meaning that the cell appears in only one column.</p></p>

<h3>See Also</h3>
<h2 class="property">rowSpan</h2>

<p>The number of rows that this cell spans.</p>

<h3>Description</h3>
<p><p>The number of rows that this cell spans. Defaults to 1, meaning the cell 
appears in only one row.</p></p>

<h3>See Also</h3>
<h2 class="property">height</h2>

<p>Minimum cell height.</p>

<h3>Notes</h3>
<p>Default value: The height is automatically sized to its 
content.</p>

<h3>Description</h3>
<p><p>Minimum cell height. Generally omitted. The size of the 
cell is the minimum of the height of its contents and the minimum cell height. 
The final cell height is set by the overall row.</p>
<p>A better practice is to set the height of the row instead the height of a 
cell.</p>
</p>

<h3>See Also</h3>
<h2 class="property">width</h2>

<p>Minimum cell width.</p>

<h3>Notes</h3>
<p>Default value: Cell width will be computed by the table 
or grid based on contents.</p>

<h3>Description</h3>
<p><p>Minimum cell width. Can be an absolute or relative width. 
If omitted, then BIRT or the browser computes the cell width based on content. 
Many users find it more intuitive to set the width on the column, rather than on 
individual cells. The overall column width is the minimum of the column width 
and the width of each cell within the column. All cells are then sized to the 
width of the column.</p>
</p>

<h3>See Also</h3>
<p><code>width</code> property of the Column element</p>
<h2 class="property">drop</h2>

<p>Whether the cells defined in this row should expand to fill the entire table or group.</p>

<h3>Choices</h3>
<ul>
<li>none: No drop header is created.</li>
<li>detail: The header is merged 
    with the cells of the detail rows, but not footer rows.</li>
<li>all: The header is merged 
    with the cells of the detail rows and footer rows.</li>
</ul>

<h3>Description</h3>
<p><p>Whether the cells defined in this row should expand to 
fill the entire table or group. Allows creating a &quot;drop&quot; header within a table. 
See explanation in the <i>ROM List and Table Specification</i>. Ignored for 
grids, and for cells that are not in group headers.</p></p>

<h2 class="property">eventHandlerClass</h2>
<p>The full qulified name of the event handler class.</p>

<h3>Description</h3>
<p>Full quilified name of the event handler class, used to specify an external Java class
which define the scripting behavior that will be executed at runtime.</p>

<h3>See Also</h3>
<h2 class="slot">content</h2>

<p>Report items that appear inside the cell.</p>

<h3>Description</h3>
<p><p>A cell can contain zero, 
one or more of the following items. The size of the item is defined to be the 
size of the cell. The (x, y) properties of the item are ignored. The normal case 
is one item. When a single item appears in a cell, the items within a row are 
aligned along the text baseline. If multiple items appear within a cell, 
alignment is undefined. Some rendering environments may baseline-align the first 
line, others may not.</p>
<p>When multiple items 
appear within a cell, each item acts a bit like a section: a like break occurs 
after each item, causing the items to be vertically stacked. The user can set 
the &quot;display&quot; property of the items to create an in-line layout: items flow from 
one line to the next with like breaks imposed by the cell width. In-line layout 
applies to the following only:</p>

<ul>
<li>Text (text is treated as a string of text, not a box)</li>

<li>Label</li>

<li>Data item</li>

<li>Image</li>

</ul>
<p>When items appear in-line, an implied space separates the 
items. That is, if a grid has two labels &quot;Sample&quot; and &quot;Labels&quot;, and they are 
marked as in-line, the resulting display is &quot;Sample Label&quot;, not &quot;SampleLabel&quot;.</p>
<p>Alignment within the cell 
is set by the elements themselves. When multiple items appear, each can have a 
distinct horizontal alignment. The set of items as a whole can be vertically 
aligned by setting <i>all</i> items to the same vertical alignment: top, middle, 
base-line or center. (Note the caveat above for base-line alignment.) If the 
multiple items have different vertical alignment, then the behavior is 
undefined. In BIRT-controlled rendering environments, the vertical alignment is 
determined by the first element.</p>
<p>The user can also put 
multiple items in a cell by first adding a container, then adding the other 
items into the container. A container provides greater control over item 
positioning, including enhanced ability to place items side-by-side.</p>
<p></p></p>

<h3>See Also</h3>
</body>
</html>